import { defineComponent } from 'vue'
import MessageFn from '@/components/Message/index'
import { onBeforeRouteLeave } from 'vue-router'
export default defineComponent({
  name: 'Dashboard',
  setup() {
    onBeforeRouteLeave(() => {
      console.log('路由离开')
      closeMes()
    })
    const closeMes = MessageFn()
    const data = { name: '是是是', code: '1adead', description: 'sss事实上' }

    console.log({ ...data })

    return () => (
      <>
        <div onClick={closeMes}>123</div>
        <div>为且二</div>
        {/* <div>{data}</div> */}
      </>
    )
  }
})
